﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Threading.Tasks;

namespace 旅游管理系统.Models
{
    /// <summary>
    /// 旅游路线图片类
    /// </summary>
    public class TouristRoutePicture
    {
        /// <summary>
        /// 图片 Id
        /// </summary>
        [Key]
        [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
        public int Id { get; set; }
        /// <summary>
        /// 照片数据
        /// </summary>
        [MaxLength(100)]
        public string Url { get; set; }
        /// <summary>
        /// 与旅游路线的外键关系
        /// </summary>
        [ForeignKey("TouristRouteId")]  //TouristRouteId = "类名TouristRoute" +"主键Id"
        public Guid TouristRouteId { get; set; }
        /// <summary>
        /// 连接属性 (连接外面的的东西)
        /// </summary>
        public TouristRoute TouristRoute { get; set; }
    }
}
